package com.kj.xuyuan.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kj.xuyuan.R;
import com.kj.xuyuan.http.UrlConstants;
import com.kj.xuyuan.model.RemindMsgBean;
import com.kj.xuyuan.util.GlideUtils;

import java.util.List;

import androidx.annotation.Nullable;

public class RemindMsgAdapter extends BaseQuickAdapter<RemindMsgBean, BaseViewHolder> {

    public RemindMsgAdapter() {
        super(R.layout.item_msg_list);
    }

    @Override
    protected void convert(BaseViewHolder helper, RemindMsgBean item) {
        helper.setText(R.id.tv_name,item.getUser().getNickname());
        helper.setText(R.id.tv_content,item.getContent());
        helper.setText(R.id.tv_appraise_type,"评论的你的动态"+item.getCreatetime());

        ImageView ivHead = helper.getView(R.id.iv_head);
        ImageView ivImage = helper.getView(R.id.iv_image);
        GlideUtils.loadRoundImage(mContext,ivHead, UrlConstants.Base_Http+item.getUser().getAvatar(),8,R.mipmap.ic_error);
        GlideUtils.loadRoundImage(mContext,ivImage, UrlConstants.Base_Http+item.getUser().getAvatar(),8,R.mipmap.ic_error);
    }
}
